Enforce Qt 5.2.0 as our new minimum floor during build.
authorRobert Lipe <robertlipe@gpsbabel.org>
Sat, 7 May 2016 02:38:29 +0000 (21:38 -0500)
committerRobert Lipe <robertlipe@gpsbabel.org>
Sat, 7 May 2016 02:38:29 +0000 (21:38 -0500)
Remove runtime checks for < that.

gui/main.cc
gui/upgrade.cc
main.cc

index 62393fbef5110f44a7f1f8ebf06ef12788d97d5e..e9f991f920f9da410c733e0aa91f883a060a41ad 100644 (file)
@@ -44,13 +44,8 @@ const char *pathSeparator = ":";
 //------------------------------------------------------------------------
 int main(int argc, char**argv)
 {
-#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
-  // Qt 5.0 uses QString::fromUtf8 to convert from character pointers 
-  // and QBytreArrays to QStrings while previous version of Qt used 
-  // QString::fromAscii.  QString::fromAscii used the codec set
-  // by QTextCode::setCodecForCStrings.
-  // This makes the conversion consistent between Qt4 and Qt5.
-  QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0))
+  #error this version of Qt is not supported.
 #endif
 
   QApplication *app;
index 93d26695ad1a1f2e47df464ebe1e21bb04fb8620..fa5cef4027b8e039350cae1174363f2457233849 100644 (file)
@@ -304,11 +304,7 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply)
   QUrl downloadUrl;
   updateStatus_ = updateCurrent;  // Current until proven guilty.
 
-#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
-  for (int i = 0; i < (int) upgrades.length(); i++) {
-#else
   for (int i = 0; i < upgrades.length(); i++) {
-#endif
     QDomNode upgradeNode = upgrades.item(i);
     QDomElement upgrade = upgradeNode.toElement();
 
diff --git a/main.cc b/main.cc
index 32e1bd44411483d5fe7089f212187c4ff229bcb1..b5a1bdb0ed5c88714081267c901fa70722dbd736 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -252,13 +252,8 @@ main(int argc, char* argv[])
 
   (void) new gpsbabel::UsAsciiCodec(); /* make sure a US-ASCII codec is available */
 
-#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
-  // Qt 5.0 uses QString::fromUtf8 to convert from character pointers
-  // and QBytreArrays to QStrings while previous version of Qt used
-  // QString::fromAscii.  QString::fromAscii used the codec set
-  // by QTextCode::setCodecForCStrings.
-  // This makes the converstion consistent between Qt4 and Qt5.
-  QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0))
+  #error This version of Qt is not supported.
 #endif
 
   // The first invocation of QTextCodec::codecForLocale() may result in LC_ALL being set to the native environment